package com.example.nongye.ui.base;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewbinding.ViewBinding;

import com.hjq.http.listener.OnHttpListener;
import com.example.nongye.R;

import ezy.ui.layout.LoadingLayout;
import okhttp3.Call;


/**
 * Create by KunMinX at 19/8/1
 */
public abstract class BaseActivity extends AppCompatActivity   implements OnHttpListener<Object> {

protected ViewBinding mViewBinding;
private LoadingLayout loadingLayout;

@Override
public void onHttpStart(Call call) {
        loadingLayout = mViewBinding.getRoot().findViewById(R.id.loadingLayout);
        if (null != loadingLayout) {
        loadingLayout.showLoading();
        }
        }

@Override
public void onHttpSuccess(Object result) {
        }

@Override
public void onHttpFail(Throwable throwable) {

        }

@Override
public void onHttpEnd(Call call) {

        }
}
